<%@ page language="java" import="java.util.*,java.sql.*"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String no = (String) request.getParameter("no");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>便签修改</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<script language="javascript" type="text/javascript"
	src="/Login/My97DatePicker/WdatePicker.js"></script>
</head>

<body>
	<%
		Class.forName("com.mysql.jdbc.Driver").newInstance();
		String url = "jdbc:mysql://localhost:3306/graduatedesign";
		String user = "root";
		String password = "root";
		String event = "";
		String note = "";
		Connection conn = DriverManager.getConnection(url, user, password);
		Statement sm = conn.createStatement();
		ResultSet rs = sm
				.executeQuery("select date,event,note from notes where no="
						+ no);
	%>
	<%
		while (rs.next()) {
	%>
	<form name="f1" method="post" action="noteedit?no=<%=no%>"
		onsubmit="return ck()">
		<table width="100%" border="0" cellpadding="0" cellspacing="1"
			bgcolor="#BBD3EB">
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">时间</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input id="date"
					name="date" class="Wdate" onFocus="WdatePicker({lang:'zh-cn'})"
					value="<%=rs.getString(1)%>" /><br>
				</td>
			</tr>

			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">事件</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text"
					id="event" name="event" size="50" value="<%=rs.getString(2)%>" />
				</td>
			</tr>

			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">备注</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<textarea rows=""
						cols="" name="note" id="note"><%=rs.getString(3)%></textarea> <script
						language=javascript src="/OA/fckeditor/fckeditor.js"></script>
				</td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF"></td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="submit"
					value="提交" /><input type="reset" value="重置" />
				</td>
			</tr>
			<script language="javascript">
				function ck() {
					if (f1.title.value == "") {
						alert("标题不能为空");
						return false;
					}
					alert("操作成功");
				}
			</script>
		</table>
	</form>
	<%
		}
	%>
</body>
</html>
